﻿using System;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Domain.Entities;
using Joy.Erp.BasicArchives.Core;
using Joy.Erp.BasicArchives.Core.UniqueCodes;

namespace Joy.Erp.BasicArchives.ItemMasters
{
    /// <summary>
    /// 料品档案
    /// </summary>
    public class ItemMaster : ArchiveAggregateRoot, IMultiTenant, IUniqueCode, IHasConcurrencyStamp
    {
        /// <summary>
        /// 所属租户
        /// </summary>
        public Guid? TenantId { get; set; }

        /// <summary>
        /// 料品类型编号
        /// </summary>
        public Guid ItemCategoryId { get; set; }

        /// <summary>
        /// 料品类型
        /// </summary>
        public ItemCategory Category { get; set; }

        /// <summary>
        /// 料品名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string Spec { get; set; }

        /// <summary>
        /// 计量单位组编号
        /// </summary>
        public Guid UnitGroupId { get; set; }

        /// <summary>
        /// 计量单位组
        /// </summary>
        public UnitGroup UnitGroup { get; set; }

        /// <summary>
        /// 可采购
        /// </summary>
        public bool CanBePurchased { get; set; }

        /// <summary>
        /// 可销售
        /// </summary>
        public bool Sellable { get; set; }

        /// <summary>
        /// 可生产
        /// </summary>
        public bool CanBeProduced { get; set; }

        /// <summary>
        /// 可委外
        /// </summary>
        public bool CanBeOutsourced { get; set; }

        /// <summary>
        /// 料品形态属性
        /// </summary>
        public int ItemFormAttribute { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool Enabled { get; set; }
    }
}
